/* 
 * Copyright 2008-2013 Mohawk College of Applied Arts and Technology
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you 
 * may not use this file except in compliance with the License. You may 
 * obtain a copy of the License at 
 * 
 * http://www.apache.org/licenses/LICENSE-2.0 
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 
 * License for the specific language governing permissions and limitations under 
 * the License.
 * 
 * User: Justin Fyfe
 * Date: 02-11-2012
 */
package org.marc.everest.xml;

import javax.xml.namespace.QName;

/**
 * A QName that can track if it has been flushed to the stream
 */
class QNameFlushable extends QName {

	// Serialization id
	private static final long serialVersionUID = 1L;

	// True if the item has been flushed
	private boolean m_writtenFlushed = false;
	
	// True if the item has innner elements
	private boolean m_hasInnerelements = false;
	
	/** 
	 * True if the object was flushed
	 */
	public boolean wasFlushed() { return m_writtenFlushed; }
	/**
	 * Marks the object as flushed
	 */
	public void setFlushed() { this.m_writtenFlushed = true; }

	/** 
	 * True if the object was flushed
	 */
	public boolean hasInnerElements() { return m_hasInnerelements; }
	/**
	 * Marks the object as flushed
	 */
	public void setHasInnerElements() { this.m_hasInnerelements = true; }

	public QNameFlushable(String namespaceURI, String localPart, String prefix) {
		super(namespaceURI, localPart, prefix);
	}

	public QNameFlushable(String namespaceURI, String localPart) {
		super(namespaceURI, localPart);
	}

	public QNameFlushable(String localPart) {
		super(localPart);
	}

	
}
